<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.twoscreen.test.Test"%>
<%@ page import="java.util.Map"%>
<%
	Map<String, Integer> tests = Test.getTestNames();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="/css/testing.css" rel="stylesheet" type="text/css" />
	<title>Software Testing</title>
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="/js/testing.js"></script>
</head>
<body>
	<div id="header">
		<h1 class="left">Tests</h1>
		<button class="right" onclick="runTest('all', 0);">Run All</button>
		<div class="right" id="all-status"></div>
	</div>
	<div class="clear"></div>
	
<%
	for (Map.Entry<String, Integer> test : tests.entrySet()) {
		String key = test.getKey();
		int value = test.getValue();
%>
	
	<div class="testWrapper" id="<%= key %>">
		<div class="test">
			<h2 class="left"><%= key %></h2>
			<button class="right" onclick="runTest('<%= key %>', <%= value %>);">Run</button>
			<div class="right status" id="<%= key %>-status"></div>
			<div class="clear"></div>
		</div>
		<div class="details">
		</div>
	</div>
	
<%	
	}
%>
	
</body>
</html>